<?php

namespace app\libs\SpreedlySDK;

use app\libs\HttpSDK\HttpService;
use app\model\ShopsPayment;
use think\helper\Arr;

class SpreedlyClient extends HttpService
{
    const BASE_URL = 'https://core.spreedly.com';
    const API_VERSION = 'v1';
    public function __construct(ShopsPayment $payment = null)
    {
        $config = $payment->config;
        $this->setChannel('spreedly')
             ->setBaseUrl(self::BASE_URL)
             ->setAuth([Arr::get($config, 'app_key'),Arr::get($config, 'app_secret')]);

    }
}